<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./script/jquery-3.7.0.js"></script>
</head>

<body>
    <button id="btn01">点我一下</button>
    <ul>
        <li id="swk">孙悟空</li>
        <li id="zbj">猪八戒</li>
        <li>沙和尚</li>
        <li>唐僧</li>
        <li>白骨精</li>
		<li>白龙马</li>
    </ul>
    <script>
        $('#btn01').click(function () {
            // $('li').text('哈哈哈');//隐式迭代
            // console.log($('li')[0]);//DOM对象
            console.log($('li')[0].textContent);//DOM对象

            $('li').text('新的文本内容').css('color', 'red');
            console.log($('li').text('新的文本内容'));//仍是一个jQuery对象
        });
    </script>
</body>

</html>